<?php if (Yii::app()->session["member_level"] != "admin" and Yii::app()->session["member_id"] == NULL): 
echo $this->redirect(Yii::app()->homeUrl);
endif; ?>
<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'productcategory-form',
    'enableAjaxValidation' => false,
        ));
?>

<div class="panel" style="margin-left: 10px">
    <div class="panel_header">ข้อมูลกลุ่มสินค้า</div>
    <div class="panel_header"><?php echo CHtml::link("กลับหน้าแรก", "index.php?r=Product/ProductCategory"); ?></div>
    <div class="panel_body grid-view">
        <table class="items" width="100%">
            <thead>
                <tr>
                    <th width="370px">กรอกข้อมูล</th>
                    <!--<th>กลุ่มผู้ใช้งานระบบ</th>-->
                </tr>
            </thead>
            <tbody>
                <tr valign="top">
                    <td>
                        <div>
                            <p>Fields with * are required.</p>
                        </div>
                        <div>
                            <?php echo $form->labelEx($model, "product_category_name_thai"); ?>
                            <?php echo $form->textField($model, "product_category_name_thai"); ?>
                        </div>
                        <div>
                            <?php echo $form->labelEx($model, "product_category_name_eng"); ?>
                            <?php echo $form->textField($model, "product_category_name_eng"); ?>
                        </div>
                        <div>
                            <?php echo $form->labelEx($model, "product_category_description"); ?>
                            <?php echo $form->textArea($model, "product_category_description",array("cols"=>50,"rows"=>8)); ?>
                        </div>
                        <div>
                            <?php echo $form->labelEx($model, "product_category_code"); ?>
                            <?php echo $form->textField($model, "product_category_code"); ?>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <?php echo $form->hiddenField($model,"id"); ?>
                        <?php echo CHtml::submitButton("บันทึกรายการ >", array("class" => "button")); ?>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<?php $this->endWidget(); ?>